home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Tools - Objects / Macintosh Programmer’s Workshop / MPW 3.1 / MPW / Interfaces / CIncludes / Signal.h < prev    next >
Text File  |  1990-12-13  |  1KB  |  62 lines

  1. /*
  2.     Signal.h -- Signal handling
  3.     
  4.     Copyright Apple Computer,Inc.    1988
  5.     All rights reserved.
  6.  
  7. */
  8.  
  9. #ifndef __SIGNAL__
  10. #define __SIGNAL__
  11.  
  12.  
  13. typedef int sig_atomic_t;
  14.  
  15.  
  16. /*
  17.  *    Special signal handlers, compatible with the second argument to signal()
  18.  *    or, in the case of SIG_ERR, the return value from signal().
  19.  */
  20.  
  21. #define SIG_DFL ((void (*)(int)) 1)
  22. #define SIG_ERR ((void (*)(int)) -1)
  23. #define SIG_IGN (0)
  24. #define SIG_HOLD ((void (*)(int)) 3)
  25. #define SIG_RELEASE ((void (*)(int)) 5)
  26.  
  27.  
  28. /*
  29.  *    Signal numbers for specific conditions.
  30.  */
  31.  
  32. #define SIGABRT        (1<<0)    /* Abnormal termination e.g. by the abort() function */
  33. #define SIGFPE        (1<<2)    /* Arithmetic exception -- not currently implemented */
  34. #define SIGILL        (1<<3)    /* Illegal instruction -- not currently implemented */
  35. #define SIGINT        (1<<1)    /* Interactive attention signal -- User interrupt via CMD-. */
  36. #define SIGSEGV        (1<<4)    /* Segmentation violation -- not currently implemented */
  37. #define SIGTERM        (1<<5)    /* Termination request -- not currently implemented */
  38.  
  39.  
  40. #ifdef __safe_link
  41. extern "C" {
  42. #endif
  43.  
  44. /*
  45.  *    Specify a signal handling function.
  46.  */
  47.  
  48. void (*signal (int sig, void (*func) (int))) (int);
  49.  
  50.  
  51. /*
  52.  *    Send a signal.
  53.  */
  54.  
  55. int raise (int sig);
  56.  
  57. #ifdef __safe_link
  58. }
  59. #endif
  60.  
  61. #endif __SIGNAL__
  62.